<template>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column fixed prop="name" label="工装名" width="150" />
    <el-table-column prop="code" label="物料号" width="120" />
    <el-table-column prop="drawingNo" label="图号" width="120" />
    <el-table-column prop="weight" label="重量（kg）" width="120" />
    <el-table-column prop="commonpart.name" label="典型工件" width="150" />
    <el-table-column prop="price" label="上次核价" width="150" />
    <el-table-column fixed="right" label="Operations" min-width="120">
      <template #default>
        <el-button link type="primary" size="small" @click="handleClick">
          再次核价
        </el-button>
        <el-button link type="primary" size="small">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script lang="ts" setup>
const handleClick = () => {
  console.log('click')
}


const {data} = await useFetch('/api/hejia',{method:"get"})
const tableData = reactive(data)

</script>
